<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>login</title>
	<script src="__ROOT__/static/admin/js/jquery-1.11.1.min.js"></script>
	<script src="__ROOT__/static/plugins/layer/layer.min.js"></script>
	<script src="__ROOT__/static/plugins/Validform_v5.3.2/Validform_v5.3.2_min.js"></script>
	<link rel="stylesheet" type="text/css" href="__ROOT__/static/admin/layui/css/layui.css">
<link rel="stylesheet" type="text/css" href="__ROOT__/static/admin/css/normalize.css" />
<link rel="stylesheet" type="text/css" href="__ROOT__/static/admin/css/demo.css" />

<!--必要样式-->
<link rel="stylesheet" type="text/css" href="__ROOT__/static/admin/css/component.css" />
<!--[if IE]>
<script src="__ROOT__/static/admin/js/html5.js"></script>
<![endif]-->
</head>
<script>
   $(function() {
       $('#login').click(function(){login()});
       $(document).keypress(function(e) {
           if(e.which == 13) {
               login();
           }
       });
   })
   function login(){
       var params = {};
       params.loginName = $.trim($("#loginName").val());
       params.loginPass = $.trim($("#loginPass").val());
       $.ajax({
			  cache:false,
               type:"POST",
               url:"{:url('admin/index/login')}",
               dataType:"text",
               data:params,
               async:false,
               success:function(data){
			      console.debug(data);
                   if(data==3){
                       layer.msg('登录成功',{time:1000,area:['120px','50px'],offset:'180px'});
                       setTimeout('window.location.href="{:url(\'admin/Index/index\')}"',2000);
                   }else if(data==1){
                       layer.msg('账号或密码错误',{time:1000,area:['150px','50px'],offset:'180px'});
                       setTimeout('window.location.href="{:url(\'admin/index/login\')}"',2000);
                   }else if(data==2){
                       layer.msg('此帐号被冻结，请联系管理员!',{time:2000,offset:'220px'});
                       setTimeout('window.location.href="{:url(\'admin/Index/login\')}"',1500);
				   }
               }
           }
       );
   }

</script>
<body>
		<div class="container demo-1">
			<div class="content">
				<div id="large-header" class="large-header">
					<canvas id="demo-canvas"></canvas>
					<div class="logo_box">
						<h3>欢迎你</h3>
						<div class="input_outer">
							<span class="u_user"></span>
							<input name="loginName" class="text" id="loginName" style="color: #FFFFFF !important" type="text" placeholder="请输入账户">
						</div>
						<div class="input_outer">
							<span class="us_uer"></span>
							<input name="loginPass" class="text" id="loginPass" style="color: #FFFFFF !important; position:absolute; z-index:100;"value="" type="password" placeholder="请输入密码">
						</div>
						<!--<input type='button' value='登录'  style="color: #FFFFFF; background-color: #0096E6; border-radius: 30px;font-weight: 700; height: 50px; width: 335px;" onclick='login()'>-->
						<div class="mb2"><button class="act-but submit" id="login" href="#" style="color: #FFFFFF; width: 335px;">登录</button></div>
					</div>
				</div>
			</div>
		</div><!-- /container -->
		<script src="__ROOT__/static/admin/js/TweenLite.min.js"></script>
		<script src="__ROOT__/static/admin/js/EasePack.min.js"></script>
		<script src="__ROOT__/static/admin/js/rAF.js"></script>
		<script src="__ROOT__/static/admin/js/demo-1.js"></script>
	</body>
</html>